Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: QuickDraw GX Printing Extensions and Drivers /
Chapter 4 - Printing Messages / Printing Messages Reference
Printing Messages / Despooling Messages


GXCloseSpoolFile

QuickDraw GX sends the GXCloseSpoolFile message to close the spool file. If you perform your own spooling, you need to override the GXCloseSpoolFile message to handle closing the spool file and updating it on disk. Your override of the GXCloseSpoolFile message must match the following formal declaration:

OSErr MyCloseSpoolFile (gxSpoolFile aSpoolFile,
                        long closeOptions);
aSpoolFile
The spool file.
closeOptions
Options for closing the spool file, as shown in Table 4-6.
function result
An error code. The value noErr indicates that the operation was successful.
DESCRIPTION
QuickDraw GX sends the GXCloseSpoolFile message to close and possibly delete a spool file once imaging is complete. You can specify various options in the closeOptions parameter. The constants for the spool-file closing options are shown in Table 4-6.
GXCloseSpoolFile options
ConstantValueExplanation
gxNoCloseOptions0x00000000No options are in effect
gxDeleteOnClose0x00000001The spool file is to be deleted rather than closed
gxUpdateJobData0x00000002QuickDraw GX needs to write the current job information into the spool file before closing it
gxMakeRemoteFile0x00000004QuickDraw GX needs to set the type of the spool file to 'rjob' rather than deleting it, which means that the file is sent to another machine for printing and that the original file is retained in case an error occurs

You can override the GXCloseSpoolFile message to perform any operations that you need to when the spool file is closed.

The default implementation of the GXCloseSpoolFile message includes the gxDeleteOnClose option.

SPECIAL CONSIDERATIONS
You rarely send the GXCloseSpoolFile message yourself.

If you are providing your own spooling, you need to totally override the GXCloseSpoolFile message and all of the other spooling and despooling messages.

If you are not providing your own spooling, you must forward the GXCloseSpoolFile message to allow the default implementation to close the spool file.

RESULT CODES
gxSegmentLoadFailedErrA required code segment could not be found,
or there was not enough memory to load it.
gxPrUserAbortErrThe user has canceled printing.
gxIncompletePrintFileErrThe spool file is not complete.
gxCrashedPrintFileErrThe spool file could not be opened.
gxInvalidPrintFileVersionThe version number of the spool file is not valid.

Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996




Navigation graphic, see text links

Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help